# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pysmi
_pkgname=pysmi
pkgver=0.3.4
pkgrel=2
pkgdesc='SNMP SMI/MIB Parser.'
url='https://pypi.org/project/pysmi/#files'
arch=('any')
license=('MIT')
depends=('python2' 'python2-ordereddict')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('720c8948a590130583d6ea388f0ade5d3bfe9e845821add7ffbf1b5495b5fe00b768ffb94f67b82465c6d86234f5306c6e1a5c2e49f4825bb9c31a0df629f7bd')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

